Package ru.snake.amazonwatcher.parser

Examples of ru.snake.amazonwatcher.parser.SiteParser


    return result;
  }

  public static void updateProductPrice(AbstractProductModel model, int index) {
    ProductInfo pi = model.get(index);
    SiteParser parser = ParserFactory.createParser(pi.getHost());

    if (parser != null) {
      PriceInfo newPrice;

      parser.parseUrl(pi.getUrl());

      newPrice = parser.getPrice();

      if (newPrice.getPrice() > 0.01f
          && Math.abs(newPrice.getPrice() - pi.getPrice()) > 0.01f) {
        try {
          new PriceChangedDialog(pi, newPrice);
View Full Code Here


  public void actionPerformed(ActionEvent arg0) {
    Thread thread = new Thread(new Runnable() {
      public void run() {
        for (int i = 0; i < dataModel.size(); i++) {
          ProductInfo pi = dataModel.get(i);
          SiteParser parser = ParserFactory.createParser(pi.getHost());

          setStatus(pi.getName());

          if (parser != null) {
            PriceInfo newPrice;

            parser.parseUrl(pi.getUrl());
            newPrice = parser.getPrice();

            pi.setPriceInfo(newPrice);

            dataModel.set(i, pi);
          }
View Full Code Here

TOP

Related Classes of ru.snake.amazonwatcher.parser.SiteParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.